#include "Time.h"
#include <windows.h>
#pragma comment(lib,"winmm.lib")

namespace Putin{


	Time::Time()
	{
		updateFrametime();
		updateFrametime();
	}

	double Time::getLastFrameTime()
	{
		return mTime;
	}

	void Time::updateFrametime()
	{
		double time = timeGetTime() / 1000.0;
		mTime = time - mLastTime;
		mLastTime = time;
	}

	double Time::getTotalTime()
	{
		return mLastTime;
	}

    Time* gTime = new Time();
}